<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <title>{TITLE}</title>
    <style>

        :root{
            --bg-color: #ffffff;
            --fg-color: #000000;

            --btn-bar-bg: #ddd;
            --btn-bg-active: #ddd;
            --btn-bg: #fff;

            --quote-bg: #f9f9f9;
            --quote-fg: #666;
            --quote-line: #ccc;
        }

        /* 当用户系统偏好为深色模式时，应用以下样式 */
        @media (prefers-color-scheme: dark) {
          :root{
            --bg-color: #070707;
            --fg-color: #eee;

            --btn-bar-bg: #000;
            --btn-bg-active: #666;
            --btn-bg: #444;

            --quote-bg: #2e2e2e;
            --quote-fg: #bbb;
            --quote-line: #4d4d4d;
            }
        }


        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
            background-color: var(--bg-color);
            color: var(--fg-color);
            word-break: normal;
            hyphenate-character: '-';
            hyphens: auto;
        }

        #editor {
            width: 100%;
            padding: 12px;
            box-sizing: border-box;
        }

        #toolbar {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 44px;
            background-color: var(--btn-bar-bg);
            border-top: 1px solid var(--btn-bg-active);
            display: flex;
            align-items: center;
            padding: 3px 3px 5px 3px;
            box-sizing: border-box;
            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;
            z-index: 1000;
            /* 防止移动端长按按钮时出现菜单 */
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        .toolbar-inner{
            height: 42px;
            flex-grow: 1;

            display: flex;
            align-items: center;

            box-sizing: border-box;

            overflow-x: auto;
            overflow-y: hidden;
            white-space: nowrap;

            /* 防止移动端长按按钮时出现菜单 */
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            user-select: none;
        }

        #toolbar button {
            width: 36px;
            height: 36px;
            margin: 0 3px;
            border: none;
            background-color: var(--btn-bg);
            cursor: pointer;
            border-radius: 4px;
            color: var(--fg-color);
            font-size: 16px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            /* 添加过渡效果，使按压更平滑 */
            transition: background-color 0.1s, transform 0.1s;
        }

        /* --- v1.5 移动端适配：为所有设备添加按压样式 --- */
        #toolbar button:active {
            background-color: var(--btn-bg-active);
            transform: scale(0.98);
        }

        .tickbefore::before { content: "√"; font-family: monospace; margin-left: -1em; display: inline-block; width: 1em; color: #00bb00; text-align: center;}
        .starbefore::before { content: "*"; font-family: monospace; margin-left: -1em; display: inline-block; width: 1em; text-align: center;}
        .dashbefore::before { content: "▪"; margin-left: -1em; display: inline-block; width: 1em; text-align: center;}
        .crossbefore::before { content: "×"; margin-left: -1em; display: inline-block; width: 1em; color: red;text-align: center; }
        .ongoingbefore::before { content: "→"; margin-left: -1em; display: inline-block; width: 1em; text-align: center; }
        .questionbefore::before { content: "?"; margin-left: -1em; display: inline-block; width: 1em; color: magenta; text-align: center;}
        .importantbefore::before { content: "!"; margin-left: -1em; display: inline-block; width: 1em; color: crimson; font-weight: bold;text-align: center; }
        .plusbefore::before { content: "+"; margin-left: -1em; display: inline-block; width: 1em;text-align: center; }

        .tickbefore, .starbefore, .dashbefore, .crossbefore, .ongoingbefore, .questionbefore, .importantbefore, .plusbefore {
            padding-left: 1em;
        }

        /* --- Other Styles --- */
        .blockquote {
            border-left: 4px solid var(--quote-line);
            padding: 0.5em 1em;
            margin: 1em 0;
            color: var(--quote-fg);
            background-color: var(--quote-bg);
        }

        .ph1 { font-size: 2em; font-weight: bold; }
        .ph2 { font-size: 1.5em; font-weight: bold; }
        .ph3 { font-size: 1.17em; font-weight: bold; }

        .lv1 { margin-left: 1.5em; }
        .lv2 { margin-left: 3em; }
        .lv3 { margin-left: 4.5em; }
        .lv4 { margin-left: 6em; }
        .lv5 { margin-left: 7.5em; }
        .lv6 { margin-left: 9em; }


    </style>
</head>

<body>
    <div id="editor">
        {CONTENT}
    </div>
</body>
</html>
